import React from 'react';
import { Tabs } from 'antd';
import AllQuestions from './components/AllQuestions';
import RandomQuestions from './components/RandomQuestions';
import PaggingQuestion from './components/PaggingQuestion';
import 'antd/dist/reset.css';
import './App.css';

import questions from './/questionPool/admin' //修改这里以切换题库


const {standardCount,questionList} = questions
const items = [
  {
    key: '1',
    label: '全量背题(' + questionList.length + ')',
    children: <AllQuestions questions={questions}/>,
  },
  {
    key: '2',
    label: '分页背题(' + questionList.length + ')',
    children: <PaggingQuestion questions={questions}/>,
  },
  {
    key: '3',
    label: '模拟考试(' + standardCount + ')',
    children: <RandomQuestions questions={questions}/>,
  },
];

const App = () => (
  <div className="App">
    <Tabs defaultActiveKey="1" items={items} />
  </div>
);

export default App;